package cn.lixin.hrm.levelEnum;

public enum CourseLevelEnum {
    BRONZE(1L,"青铜"),
    SILVER(2L,"白银"),
    GOLD(3L,"黄金"),
    PLATINUM(4L,"铂金");
    private Long id;
    private String level;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    CourseLevelEnum(Long id, String level) {
        this.id = id;
        this.level = level;
    }

    public static CourseLevelEnum check(Long gradeId){
        CourseLevelEnum[] values = CourseLevelEnum.values();
        for (CourseLevelEnum value : values) {
            if (value.getId().equals(gradeId)){
                return value;
            }
        }
        return null;
    }
}
